<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>BadgerDB: badgerdb::File Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">BadgerDB
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacebadgerdb.html">badgerdb</a>      </li>
      <li class="navelem"><a class="el" href="classbadgerdb_1_1_file.html">File</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">badgerdb::File Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="badgerdb::File" -->
<p>Class which represents a file in the filesystem containing database pages.  
 <a href="classbadgerdb_1_1_file.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="file_8h_source.html">file.h</a>&gt;</code></p>

<p><a href="classbadgerdb_1_1_file-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a600baaf77d18f39e51ae7473eca633c4">File</a> (const <a class="el" href="classbadgerdb_1_1_file.html">File</a> &amp;other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbadgerdb_1_1_file.html">File</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#ac403c631aec085e9f12992f260a57155">operator=</a> (const <a class="el" href="classbadgerdb_1_1_file.html">File</a> &amp;rhs)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a97fd6e3ae8dd11be883289b69d560287">~File</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbadgerdb_1_1_page.html">Page</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a7d0e047bcc8dc4cee36aac5b2060bbe3">allocatePage</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbadgerdb_1_1_page.html">Page</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#aba4762b533499b7b7cc0774192ead27c">readPage</a> (const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> page_number) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a9a1b3cc43c4631bde58c1c4f670e1036">writePage</a> (const <a class="el" href="classbadgerdb_1_1_page.html">Page</a> &amp;new_page)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a829a68ccfbeb0c9f66f3a2db7e0b99fe">deletePage</a> (const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> page_number)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbadgerdb_1_1_file_iterator.html">FileIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a32e94f392eb3740dd9eb9101b9e09d47">begin</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbadgerdb_1_1_file_iterator.html">FileIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a01e224676a67634f21d53fc4189b8f11">end</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classbadgerdb_1_1_file.html">File</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a1fb708b45103a606f189850d6bf83a0c">create</a> (const std::string &amp;<a class="el" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classbadgerdb_1_1_file.html">File</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a8462afdbd250c0a483ddfbde144c8732">open</a> (const std::string &amp;<a class="el" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a1cc69467366badbd68021ac76a91190e">remove</a> (const std::string &amp;<a class="el" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a64836156a9bb5f81d2c2c4e6f3ada24d">isOpen</a> (const std::string &amp;<a class="el" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_file.html#a864d59b12302c26b14967bd1d3e520bd">exists</a> (const std::string &amp;<a class="el" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>)</td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3cd56c83d638b63a676ae3c4b51dc1b2"></a><!-- doxytag: member="badgerdb::File::FileIterator" ref="a3cd56c83d638b63a676ae3c4b51dc1b2" args="" -->
class&#160;</td><td class="memItemRight" valign="bottom"><b>FileIterator</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a400f700afa1fdf03ca18d08ab8ade7f7"></a><!-- doxytag: member="badgerdb::File::FileTest" ref="a400f700afa1fdf03ca18d08ab8ade7f7" args="" -->
class&#160;</td><td class="memItemRight" valign="bottom"><b>FileTest</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class which represents a file in the filesystem containing database pages. </p>
<p>The <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> class wraps a stream to an underlying file on disk. Files contain fixed-sized pages, and they never deallocate space (though they do reuse deleted pages if possible). If multiple <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> objects refer to the same underlying file, they will share the stream in memory. If a file that has already been opened (possibly by another query), then the <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> class detects this (by looking in the open_streams_ map) and just returns a file object with the already created stream for the file without actually opening the UNIX file again.</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>This class is not threadsafe. </dd></dl>

<p>Definition at line <a class="el" href="file_8h_source.html#l00073">73</a> of file <a class="el" href="file_8h_source.html">file.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a600baaf77d18f39e51ae7473eca633c4"></a><!-- doxytag: member="badgerdb::File::File" ref="a600baaf77d18f39e51ae7473eca633c4" args="(const File &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_file.html#a600baaf77d18f39e51ae7473eca633c4">badgerdb::File::File</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classbadgerdb_1_1_file.html">File</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Copy constructor.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td><a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object to copy. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A copy of the <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object. </dd></dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00065">65</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">  : filename_(other.filename_),
    stream_(open_streams_[filename_]) {
  ++open_counts_[filename_];
}
</pre></div>
</div>
</div>
<a class="anchor" id="a97fd6e3ae8dd11be883289b69d560287"></a><!-- doxytag: member="badgerdb::File::~File" ref="a97fd6e3ae8dd11be883289b69d560287" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_file.html#a97fd6e3ae8dd11be883289b69d560287">badgerdb::File::~File</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor that automatically closes the underlying file if no other <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> objects are using it. </p>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00080">80</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">            {
  close();
}
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7d0e047bcc8dc4cee36aac5b2060bbe3"></a><!-- doxytag: member="badgerdb::File::allocatePage" ref="a7d0e047bcc8dc4cee36aac5b2060bbe3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_page.html">Page</a> <a class="el" href="classbadgerdb_1_1_file.html#a7d0e047bcc8dc4cee36aac5b2060bbe3">badgerdb::File::allocatePage</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Allocates a new page in the file.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The new page. </dd></dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00084">84</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                        {
  FileHeader header = readHeader();
  Page new_page;
  Page existing_page;
  <span class="keywordflow">if</span> (header.num_free_pages &gt; 0) {
    new_page = <a class="code" href="classbadgerdb_1_1_file.html#aba4762b533499b7b7cc0774192ead27c">readPage</a>(header.first_free_page, <span class="keyword">true</span> <span class="comment">/* allow_free */</span>);
    new_page.set_page_number(header.first_free_page);
    header.first_free_page = new_page.next_page_number();
    --header.num_free_pages;

    <span class="keywordflow">if</span> (header.first_used_page == <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a> ||
        header.first_used_page &gt; new_page.page_number()) {
      <span class="comment">// Either have no pages used or the head of the used list is a page later</span>
      <span class="comment">// than the one we just allocated, so add the new page to the head.</span>
      <span class="keywordflow">if</span> (header.first_used_page &gt; new_page.page_number()) {
        new_page.set_next_page_number(header.first_used_page);
      }
      header.first_used_page = new_page.page_number();
    } <span class="keywordflow">else</span> {
      <span class="comment">// New page is reused from somewhere after the beginning, so we need to</span>
      <span class="comment">// find where in the used list to insert it.</span>
      <a class="code" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a" title="Identifier for a page in a file.">PageId</a> next_page_number = <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>;
      <span class="keywordflow">for</span> (FileIterator iter = <a class="code" href="classbadgerdb_1_1_file.html#a32e94f392eb3740dd9eb9101b9e09d47">begin</a>(); iter != <a class="code" href="classbadgerdb_1_1_file.html#a01e224676a67634f21d53fc4189b8f11">end</a>(); ++iter) {
        next_page_number = (*iter).next_page_number();
        <span class="keywordflow">if</span> (next_page_number &gt; new_page.page_number() ||
            next_page_number == <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>) {
          existing_page = *iter;
          <span class="keywordflow">break</span>;
        }
      }
      existing_page.set_next_page_number(new_page.page_number());
      new_page.set_next_page_number(next_page_number);
    }

    assert((header.num_free_pages == 0) ==
           (header.first_free_page == <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>));
  } <span class="keywordflow">else</span> {
    new_page.set_page_number(header.num_pages);
    <span class="keywordflow">if</span> (header.first_used_page == <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>) {
      header.first_used_page = new_page.page_number();
    } <span class="keywordflow">else</span> {
      <span class="comment">// If we have pages allocated, we need to add the new page to the tail</span>
      <span class="comment">// of the linked list.</span>
      <span class="keywordflow">for</span> (FileIterator iter = <a class="code" href="classbadgerdb_1_1_file.html#a32e94f392eb3740dd9eb9101b9e09d47">begin</a>(); iter != <a class="code" href="classbadgerdb_1_1_file.html#a01e224676a67634f21d53fc4189b8f11">end</a>(); ++iter) {
        <span class="keywordflow">if</span> ((*iter).next_page_number() == <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>) {
          existing_page = *iter;
          <span class="keywordflow">break</span>;
        }
      }
      assert(existing_page.isUsed());
      existing_page.set_next_page_number(new_page.page_number());
    }
    ++header.num_pages;
  }
  <a class="code" href="classbadgerdb_1_1_file.html#a9a1b3cc43c4631bde58c1c4f670e1036">writePage</a>(new_page.page_number(), new_page);
  <span class="keywordflow">if</span> (existing_page.page_number() != <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>) {
    <span class="comment">// If we updated an existing page by inserting the new page into the</span>
    <span class="comment">// used list, we need to write it out.</span>
    <a class="code" href="classbadgerdb_1_1_file.html#a9a1b3cc43c4631bde58c1c4f670e1036">writePage</a>(existing_page.page_number(), existing_page);
  }
  writeHeader(header);

  <span class="keywordflow">return</span> new_page;
}
</pre></div>
</div>
</div>
<a class="anchor" id="a32e94f392eb3740dd9eb9101b9e09d47"></a><!-- doxytag: member="badgerdb::File::begin" ref="a32e94f392eb3740dd9eb9101b9e09d47" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_file_iterator.html">FileIterator</a> <a class="el" href="classbadgerdb_1_1_file.html#a32e94f392eb3740dd9eb9101b9e09d47">badgerdb::File::begin</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns an iterator at the first page in the file.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator at first page of file. </dd></dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00214">214</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                         {
  <span class="keyword">const</span> FileHeader&amp; header = readHeader();
  <span class="keywordflow">return</span> FileIterator(<span class="keyword">this</span>, header.first_used_page);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a1fb708b45103a606f189850d6bf83a0c"></a><!-- doxytag: member="badgerdb::File::create" ref="a1fb708b45103a606f189850d6bf83a0c" args="(const std::string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_file.html">File</a> <a class="el" href="classbadgerdb_1_1_file.html#a1fb708b45103a606f189850d6bf83a0c">badgerdb::File::create</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new file.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classbadgerdb_1_1_file_exists_exception.html" title="An exception that is thrown when a file creation is requested for a filename that already exists...">FileExistsException</a></td><td>If the requested file already exists. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00029">29</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                           {
  <span class="keywordflow">return</span> <a class="code" href="classbadgerdb_1_1_file.html#a600baaf77d18f39e51ae7473eca633c4">File</a>(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>, <span class="keyword">true</span> <span class="comment">/* create_new */</span>);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a829a68ccfbeb0c9f66f3a2db7e0b99fe"></a><!-- doxytag: member="badgerdb::File::deletePage" ref="a829a68ccfbeb0c9f66f3a2db7e0b99fe" args="(const PageId page_number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classbadgerdb_1_1_file.html#a829a68ccfbeb0c9f66f3a2db7e0b99fe">badgerdb::File::deletePage</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td>
          <td class="paramname"><em>page_number</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Deletes a page from the file.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">page_number</td><td>Number of page to delete. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00184">184</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                              {
  FileHeader header = readHeader();
  Page existing_page = <a class="code" href="classbadgerdb_1_1_file.html#aba4762b533499b7b7cc0774192ead27c">readPage</a>(page_number);
  Page previous_page;
  <span class="comment">// If this page is the head of the used list, update the header to point to</span>
  <span class="comment">// the next page in line.</span>
  <span class="keywordflow">if</span> (page_number == header.first_used_page) {
    header.first_used_page = existing_page.next_page_number();
  } <span class="keywordflow">else</span> {
    <span class="comment">// Walk the used list so we can update the page that points to this one.</span>
    <span class="keywordflow">for</span> (FileIterator iter = <a class="code" href="classbadgerdb_1_1_file.html#a32e94f392eb3740dd9eb9101b9e09d47">begin</a>(); iter != <a class="code" href="classbadgerdb_1_1_file.html#a01e224676a67634f21d53fc4189b8f11">end</a>(); ++iter) {
      previous_page = *iter;
      <span class="keywordflow">if</span> (previous_page.next_page_number() == existing_page.page_number()) {
        previous_page.set_next_page_number(existing_page.next_page_number());
        <span class="keywordflow">break</span>;
      }
    }
  }
  <span class="comment">// Clear the page and add it to the head of the free list.</span>
  existing_page.initialize();
  existing_page.set_next_page_number(header.first_free_page);
  header.first_free_page = page_number;
  ++header.num_free_pages;
  <span class="keywordflow">if</span> (previous_page.isUsed()) {
    <a class="code" href="classbadgerdb_1_1_file.html#a9a1b3cc43c4631bde58c1c4f670e1036">writePage</a>(previous_page.page_number(), previous_page);
  }
  <a class="code" href="classbadgerdb_1_1_file.html#a9a1b3cc43c4631bde58c1c4f670e1036">writePage</a>(page_number, existing_page);
  writeHeader(header);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a01e224676a67634f21d53fc4189b8f11"></a><!-- doxytag: member="badgerdb::File::end" ref="a01e224676a67634f21d53fc4189b8f11" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_file_iterator.html">FileIterator</a> <a class="el" href="classbadgerdb_1_1_file.html#a01e224676a67634f21d53fc4189b8f11">badgerdb::File::end</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns an iterator representing the page after the last page in the file. This iterator should not be dereferenced.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator representing page after the last page in the file. </dd></dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00219">219</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                       {
  <span class="keywordflow">return</span> FileIterator(<span class="keyword">this</span>, <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a864d59b12302c26b14967bd1d3e520bd"></a><!-- doxytag: member="badgerdb::File::exists" ref="a864d59b12302c26b14967bd1d3e520bd" args="(const std::string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classbadgerdb_1_1_file.html#a864d59b12302c26b14967bd1d3e520bd">badgerdb::File::exists</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns true if the file exists and is open.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00054">54</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                           {
  std::fstream file(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>);
  <span class="keywordflow">if</span>(file)
  {
    file.close();
    <span class="keywordflow">return</span> <span class="keyword">true</span>;
  }

  <span class="keywordflow">return</span> <span class="keyword">false</span>;
}
</pre></div>
</div>
</div>
<a class="anchor" id="ac61ce3c2233fd1f7e2e2a8a5a7640936"></a><!-- doxytag: member="badgerdb::File::filename" ref="ac61ce3c2233fd1f7e2e2a8a5a7640936" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string&amp; <a class="el" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">badgerdb::File::filename</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the name of the file this object represents.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Name of file. </dd></dl>

<p>Definition at line <a class="el" href="file_8h_source.html#l00179">179</a> of file <a class="el" href="file_8h_source.html">file.h</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> filename_; }
</pre></div>
</div>
</div>
<a class="anchor" id="a64836156a9bb5f81d2c2c4e6f3ada24d"></a><!-- doxytag: member="badgerdb::File::isOpen" ref="a64836156a9bb5f81d2c2c4e6f3ada24d" args="(const std::string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classbadgerdb_1_1_file.html#a64836156a9bb5f81d2c2c4e6f3ada24d">badgerdb::File::isOpen</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns true if the file exists and is open.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00047">47</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                           {
  <span class="keywordflow">if</span> (!<a class="code" href="classbadgerdb_1_1_file.html#a864d59b12302c26b14967bd1d3e520bd">exists</a>(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>)) {
    <span class="keywordflow">return</span> <span class="keyword">false</span>;
  }
  <span class="keywordflow">return</span> open_counts_.find(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>) != open_counts_.end();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a8462afdbd250c0a483ddfbde144c8732"></a><!-- doxytag: member="badgerdb::File::open" ref="a8462afdbd250c0a483ddfbde144c8732" args="(const std::string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_file.html">File</a> <a class="el" href="classbadgerdb_1_1_file.html#a8462afdbd250c0a483ddfbde144c8732">badgerdb::File::open</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Opens the file named fileName and returns the corresponding <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object. It first checks if the file is already open. If so, then the new <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object created uses the same input-output stream to read to or write fom that already open file. Reference count (open_counts_ static variable inside the <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object) is incremented whenever an already open file is opened again. Otherwise the UNIX file is actually opened. The fileName and the stream associated with this <a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object are inserted into the open_streams_ map.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classbadgerdb_1_1_file_not_found_exception.html" title="An exception that is thrown when a file operation is requested for a filename that doesn&#39;t exist...">FileNotFoundException</a></td><td>If the requested file doesn't exist. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00033">33</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                         {
  <span class="keywordflow">return</span> <a class="code" href="classbadgerdb_1_1_file.html#a600baaf77d18f39e51ae7473eca633c4">File</a>(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>, <span class="keyword">false</span> <span class="comment">/* create_new */</span>);
}
</pre></div>
</div>
</div>
<a class="anchor" id="ac403c631aec085e9f12992f260a57155"></a><!-- doxytag: member="badgerdb::File::operator=" ref="ac403c631aec085e9f12992f260a57155" args="(const File &amp;rhs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_file.html">File</a> &amp; badgerdb::File::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classbadgerdb_1_1_file.html">File</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Assignment operator.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rhs</td><td><a class="el" href="classbadgerdb_1_1_file.html" title="Class which represents a file in the filesystem containing database pages.">File</a> object to assign. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Newly assigned file object. </dd></dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00071">71</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                     {
  <span class="comment">// This accounts for self-assignment and assignment of a File object for the</span>
  <span class="comment">// same file.</span>
  close();  <span class="comment">//close my file and associate me with the new one</span>
  filename_ = rhs.filename_;
  openIfNeeded(<span class="keyword">false</span> <span class="comment">/* create_new */</span>);
  <span class="keywordflow">return</span> *<span class="keyword">this</span>;
}
</pre></div>
</div>
</div>
<a class="anchor" id="aba4762b533499b7b7cc0774192ead27c"></a><!-- doxytag: member="badgerdb::File::readPage" ref="aba4762b533499b7b7cc0774192ead27c" args="(const PageId page_number) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_page.html">Page</a> <a class="el" href="classbadgerdb_1_1_file.html#aba4762b533499b7b7cc0774192ead27c">badgerdb::File::readPage</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>&#160;</td>
          <td class="paramname"><em>page_number</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reads an existing page from the file.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">page_number</td><td>Number of page to read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The page. </dd></dl>
<dl class="exception"><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classbadgerdb_1_1_invalid_page_exception.html" title="An exception that is thrown when an attempt is made to access an invalid page in a file...">InvalidPageException</a></td><td>If the page doesn't exist in the file or is not currently used. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00149">149</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                                  {
  FileHeader header = readHeader();
  <span class="keywordflow">if</span> (page_number &gt;= header.num_pages) {
    <span class="keywordflow">throw</span> InvalidPageException(page_number, filename_);
  }
  <span class="keywordflow">return</span> <a class="code" href="classbadgerdb_1_1_file.html#aba4762b533499b7b7cc0774192ead27c">readPage</a>(page_number, <span class="keyword">false</span> <span class="comment">/* allow_free */</span>);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a1cc69467366badbd68021ac76a91190e"></a><!-- doxytag: member="badgerdb::File::remove" ref="a1cc69467366badbd68021ac76a91190e" args="(const std::string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classbadgerdb_1_1_file.html#a1cc69467366badbd68021ac76a91190e">badgerdb::File::remove</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Deletes an existing file.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classbadgerdb_1_1_file_not_found_exception.html" title="An exception that is thrown when a file operation is requested for a filename that doesn&#39;t exist...">FileNotFoundException</a></td><td>If the file doesn't exist. </td></tr>
    <tr><td class="paramname"><a class="el" href="classbadgerdb_1_1_file_open_exception.html" title="An exception that is thrown when a file deletion is requested for a filename that&#39;s currently open...">FileOpenException</a></td><td>If the file is currently open. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00037">37</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                           {
  <span class="keywordflow">if</span> (!<a class="code" href="classbadgerdb_1_1_file.html#a864d59b12302c26b14967bd1d3e520bd">exists</a>(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>)) {
    <span class="keywordflow">throw</span> FileNotFoundException(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>);
  }
  <span class="keywordflow">if</span> (<a class="code" href="classbadgerdb_1_1_file.html#a64836156a9bb5f81d2c2c4e6f3ada24d">isOpen</a>(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>)) {
    <span class="keywordflow">throw</span> FileOpenException(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>);
  }
  <a class="code" href="classbadgerdb_1_1_file.html#a1cc69467366badbd68021ac76a91190e">std::remove</a>(<a class="code" href="classbadgerdb_1_1_file.html#ac61ce3c2233fd1f7e2e2a8a5a7640936">filename</a>.c_str());
}
</pre></div>
</div>
</div>
<a class="anchor" id="a9a1b3cc43c4631bde58c1c4f670e1036"></a><!-- doxytag: member="badgerdb::File::writePage" ref="a9a1b3cc43c4631bde58c1c4f670e1036" args="(const Page &amp;new_page)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classbadgerdb_1_1_file.html#a9a1b3cc43c4631bde58c1c4f670e1036">badgerdb::File::writePage</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classbadgerdb_1_1_page.html">Page</a> &amp;&#160;</td>
          <td class="paramname"><em>new_page</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Writes a page into the file, replacing any existing contents. The page must have been already allocated in this file by a call to <a class="el" href="classbadgerdb_1_1_file.html#a7d0e047bcc8dc4cee36aac5b2060bbe3">allocatePage()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classbadgerdb_1_1_file.html#a7d0e047bcc8dc4cee36aac5b2060bbe3">allocatePage()</a> </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">new_page</td><td><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> to write. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="file_8cpp_source.html#l00169">169</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                         {
  PageHeader header = readPageHeader(new_page.page_number());
  <span class="keywordflow">if</span> (header.current_page_number == <a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>) {
    <span class="comment">// Page has been deleted since it was read.</span>
    <span class="keywordflow">throw</span> InvalidPageException(new_page.page_number(), filename_);
  }
  <span class="comment">// Page on disk may have had its next page pointer updated since it was read;</span>
  <span class="comment">// we don&#39;t modify that, but we do keep all the other modifications to the</span>
  <span class="comment">// page header.</span>
  <span class="keyword">const</span> <a class="code" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a" title="Identifier for a page in a file.">PageId</a> next_page_number = header.next_page_number;
  header = new_page.header_;
  header.next_page_number = next_page_number;
  <a class="code" href="classbadgerdb_1_1_file.html#a9a1b3cc43c4631bde58c1c4f670e1036">writePage</a>(new_page.page_number(), header, new_page);
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>bufmgr/src/<a class="el" href="file_8h_source.html">file.h</a></li>
<li>bufmgr/src/<a class="el" href="file_8cpp_source.html">file.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 30 2013 14:17:57 for BadgerDB by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
